package edu.hrbeu.crc.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "SYSDBA.\"saving_plan\"")
public class SavingPlan implements Serializable {
    // 序列化版本号
    @Serial
    private static final long serialVersionUID = 1L;
    // 主键
    @TableId(value = "ID",type = IdType.AUTO)
    private Integer id;
    // 存钱计划名称
    @TableField("NAME")
    private String name;
    // 目标金额
    @TableField("TARGET_AMOUNT")
    private Double targetAmount;
    // 当前已存金额
    @TableField("CURRENT_AMOUNT")
    private Double currentAmount;
    // 计划开始时间
    @TableField("START_DATE")
    private LocalDate startDate;
    // 计划结束日期（可选）
    @TableField("END_DATE")
    private LocalDate endDate;
    // 用户id
    @TableField("USER_ID")
    private Integer userId;
    // 计划备注（可选）
    @TableField("REMARK")
    private String remark;
    // 创建时间
    @TableField("CREATE_TIME")
    private LocalDateTime createTime;
}
